<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>智码星球</title>
    <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Roboto', sans-serif;
        }

        html,
        body {
            width: 100%;
            height: 100%;
            background-color: #f0f2f5;
            display: flex;
            align-items: center;
            justify-content: center;
            overflow: hidden;
        }

        .container {
            width: 100%;
            height: 100%;
            display: flex;
            flex-direction: row;
            background-color: #fff;
        }

        .left-side {
            flex: 2;
            background-color: #E8F4D7;
            color: #2E7D32;
            padding: 40px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
            box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .left-side h1 {
            font-size: 48px;
            margin-bottom: 20px;
            font-weight: 700;
            text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
            background: linear-gradient(90deg, #4CAF50, #2E7D32);
            -webkit-background-clip: text;
            color: transparent;
        }

        .slider {
            position: relative;
            width: 80%;
            max-width: 600px;
            height: 100px;
            overflow: hidden;
            text-align: center;
            line-height: 100px;
            font-size: 24px;
            color: #333;
        }

        .slide {
            position: absolute;
            width: 100%;
            opacity: 0;
            transition: opacity 1s ease-in-out;
        }

        .slide.active {
            opacity: 1;
        }

        .right-side {
            flex: 1;
            background-color: #ffffff;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            text-align: center;
        }

        .navbar {
            width: 100%;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
        }

        .navbar a {
            color: white;
            font-size: 24px;
            text-decoration: none;
            padding: 15px 30px;
            border-radius: 5px;
            background-color: #4CAF50;
            width: 150px;
            text-align: center;
            transition: background-color 0.3s ease, transform 0.3s ease;
        }

        .navbar a:hover {
            background-color: #45a049;
            transform: scale(1.05);
        }

        .navbar a:active {
            background-color: #3e8e41;
            transform: scale(0.95);
        }

        .navbar a.start {
            color: black;
            background-color: transparent;
            font-size: 26px;
            font-weight: bold;
            border: none;
            width: auto;
            padding: 0;
        }

        .navbar-row {
            display: flex;
            gap: 20px;
        }

        .line-animation {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            overflow: hidden;
            pointer-events: none;
        }

        .line-animation::before,
        .line-animation::after {
            content: '';
            position: absolute;
            width: 100%;
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
            animation: moveX 2s linear infinite;
        }

        .line-animation::after {
            top: auto;
            bottom: 0;
            animation-delay: 1s;
        }

        @keyframes moveX {
            0% {
                transform: translateX(-100%);
            }

            100% {
                transform: translateX(100%);
            }
        }

        @media (max-width: 768px) {
            .container {
                flex-direction: column;
                height: auto;
            }

            .left-side,
            .right-side {
                width: 100%;
                padding: 20px;
            }

            .left-side h1 {
                font-size: 36px;
            }

            .navbar a {
                font-size: 20px;
                padding: 10px 20px;
            }

            .navbar-row {
                flex-direction: column;
                gap: 10px;
            }
        }
    </style>
</head>

<body>
    <div class="container">
        <!-- 动态线条背景 -->
        <div class="line-animation"></div>

        <!-- 左侧标题 -->
        <div class="left-side">
            <h1>欢迎来到SMART CODE PLANET</h1>
            <div class="slider">
                <div class="slide active">这是一个由我个人独立开发的在线 OJ 平台</div>
                <div class="slide">请登录或注册以开始使用</div>
                <div class="slide">欢迎加入我们的社区！</div>
            </div>
        </div>

        <!-- 右侧登录注册 -->
        <div class="right-side">
            <div class="navbar">
                <a href="#" class="start">开始使用</a>
                <div class="navbar-row">
                    <a href="login.html" class="login">登录</a>
                    <a href="register.html" class="register">注册</a>
                </div>
            </div>
        </div>
    </div>
    <script>
        let slides = document.querySelectorAll('.slide');
        let currentIndex = 0;

        function showSlide(index) {
            slides.forEach((slide, idx) => {
                slide.classList.remove('active');
                if (idx === index) {
                    slide.classList.add('active');
                }
            });
        }

        setInterval(() => {
            currentIndex = (currentIndex + 1) % slides.length;
            showSlide(currentIndex);
        }, 3000); // 3000毫秒切换一次
    </script>
</body>

</html>